<template>
   <keep-alive>
    <component :is="who" :obj="obj"></component>
  </keep-alive>
</template>

<script>
import communityTable from "./communityTable.vue";
import communityDetail from "./communityDetail.vue";
export default {
  name: "community",
  components: {
    communityTable,
    communityDetail
  },
  data() {
    return {
      who: "communityTable", //默认展示表格
      obj: ""
    };
  },
  methods: {
    show(who, obj) {
      this.obj = obj;
      this.who = who;
    }
  }
};
</script>

<style></style>
